<?php

namespace app\shadmin\controller;


use think\Db;
use think\Request;



class Finance extends \think\Controller
{
    public function _initialize()
    {
        // parent::_initialize();
        if (!session('?aid')) {

            $this->redirect('shadmin/login/index');


        }
         
        
         
         if(session('status')!=="财务部" && session('status')!="管理员"){




          $this->redirect('shadmin/login/noacc');
         

        }

    }


    public function index(){
          
     

   




        return view();
    }







    public function main(){


        





      
        return view();


    }



    public function so9order(){


        $s=input('param.');

        
        $where['type']=$s['type'];
         
        if($s['state']){

            $where['state']=$s['state'];
        }else{
        
            $where['state']=['neq',0];

        }


        if($s['key']){

         $where['name|tel|title']=['like',"%".$s['key']."%"];


        }

        if($s['ks'] && $s['jz']){

            $where['addtime']=['BETWEEN',$s['ks'].",".$s['jz']];

        }

        $list=Db::table('so9_order')->where($where)->order('addtime desc')->select();
        $this->assign('list', $list);

        return view();
    }


















}